import Vue from 'vue'
import Router from 'vue-router'
import list from '../components/list.vue'
import detail from '../components/detail.vue'
import result from '../components/result.vue'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
   return originalPush.call(this, location).catch(err => err)
}
Vue.use(Router)
export default new Router({
    routes:[
        {
            path:'/',
            name:'list',
            component:list,
            meta:{
                title:'就诊记录'
            }
        },
        {
            path:'/detail',
            name:'detail',
            component:detail,
            meta:{
                title:'就诊详情'
            }
        },
        {
            path:'/result',
            name:'result',
            component:result,
            meta:{
                title:'检验结果'
            }
        },
        {
            path:'/clinic',
            name:'clinic',
            component:()=>import('@/components/clinic.vue'),
            meta:{
                title:'选择科室'
            }
        },
        {
            path:'/schedule',
            name:'schedule',
            component:()=>import('@/components/schedule.vue'),
            meta:{
                title:'预约挂号'
            }
        },
        {
            path:'/covschedule',
            name:'covschedule',
            component:()=>import('@/components/covschedule.vue'),
            meta:{
                title:'核酸检测'
            }
        },
        {
            path:'/todayschedule',
            name:'todayschedule',
            component:()=>import('@/components/todayschedule.vue'),
            meta:{
                title:'当日挂号'
            }
        },
        {
            path:'/tpdayclinic',
            name:'todayclinic',
            component:()=>import('@/components/todayclinic.vue'),
            meta:{
                title:'选择科室'
            }
        },
        {
            path:'/flowtable',
            name:'flowtable',
            component:()=>import('@/components/flowtable.vue'),
            meta:{
                title:'流调表'
            }
        },
        {
            path:'/flowAlert',
            name:'flowAlert',
            component:()=>import('@/components/flowAlert.vue'),
            meta:{
                title:'流调结果'
            }
        },
        {
            path:'/card',
            name:'card',
            component:()=>import('@/components/card.vue'),
            meta:{
                title:'添加健康卡'
            }
        },
        {
            path:'/idinfo',
            name:'idinfo',
            component:()=>import('@/components/idInfo.vue'),
            meta:{
                title:'健康卡信息'
            }
        },
        {
            path:'/mycard',
            name:'mycard',
            component:()=>import('@/components/mycard.vue'),
            meta:{
                title:'电子健康卡'
            }
        },
        {
            path:'/addcard',
            name:'addcard',
            component:()=>import('@/components/addcard.vue'),
            meta:{
                title:'身份证信息'
            }
        },
        {
            path:'/test',
            name:'test',
            component:()=>import('@/components/test.vue'),
            meta:{
                title:'测试'
            }
        },
    ]
    
})